<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" data-rule="required" value="{$row.name|htmlentities}" placeholder="请输入商品名称">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">商品副标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subtitle" class="form-control" name="row[subtitle]" type="text" value="{$row.subtitle|htmlentities}" placeholder="请输入商品副标题">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="product/category/index" class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id}" placeholder="请选择商品分类">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Merchant')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-merchant_id" data-rule="required" data-source="merchant/index" class="form-control selectpage" name="row[merchant_id]" type="text" value="{$row.merchant_id}" placeholder="请选择商家">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">关键词:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-keywords" class="form-control" name="row[keywords]" type="text" value="{$row.keywords|htmlentities}" placeholder="请输入关键词，多个关键词用逗号分隔">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">主图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-main_image" class="form-control" name="row[main_image]" type="text" value="{$row.main_image}" placeholder="请上传或选择主图片">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-main_image" class="btn btn-danger plupload" data-input-id="c-main_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-main_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-main_image" class="btn btn-primary fachoose" data-input-id="c-main_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
            </div>
            <ul class="row list-inline plupload-preview" id="p-main_image"></ul>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">商品图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images}" placeholder="请上传或选择商品图片">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" class="form-control" rows="3" name="row[description]" cols="50" placeholder="请输入商品简介">{$row.description}</textarea>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">详细内容:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50" placeholder="请输入商品详细描述">{$row.content}</textarea>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Price')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price}" data-rule="required" placeholder="商品价格">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Market price')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-market_price" class="form-control" step="0.01" name="row[market_price]" type="number" value="{$row.market_price}" placeholder="市场价格">
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">成本价格:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-cost_price" class="form-control" step="0.01" name="row[cost_price]" type="number" value="{$row.cost_price}" placeholder="成本价格">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Stock')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-stock" class="form-control" name="row[stock]" type="number" value="{$row.stock}" data-rule="required" placeholder="库存数量">
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Weight')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-weight" class="form-control" step="0.01" name="row[weight]" type="number" value="{$row.weight}" placeholder="重量(kg)">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">单位:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-unit" class="form-control" name="row[unit]" type="text" value="{$row.unit|default='件'}" placeholder="商品单位">
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">{:__('Sort')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-sort" class="form-control" name="row[sort]" type="number" value="{$row.sort}" placeholder="排序值">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-4">上下架状态:</label>
                <div class="col-xs-12 col-sm-8">
                    <select id="c-shelf_status" class="form-control" name="row[shelf_status]">
                        <option value="1" {if condition="$row.shelf_status == 1"}selected{/if}>上架</option>
                        <option value="0" {if condition="$row.shelf_status == 0"}selected{/if}>下架</option>
                    </select>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 商品属性配置 -->
   
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>